package com.house.framework.mapper;


import com.house.framework.query.BaseQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface BaseMapper<T> extends com.baomidou.mybatisplus.core.mapper.BaseMapper<T> {
    
    /**
     *@Description 查询一个
     *@Param
     *@Return 
     */
    T loadById(Long id);
    
    /**
     *@Description 查询所有
     *@Param
     *@Return 
     */
    List<T> loadAll();
    
    /**
     *@Description 添加
     *@Param
     *@Return 
     */
    void add(T t);
    
    /**
     *@Description 修改
     *@Param
     *@Return 
     */
    void update(T t);
    
    /**
     *@Description 删除
     *@Param
     *@Return 
     */
    void remove(Long id);

    
    /**
     *@Description 分页查询总条数
     *@Param
     *@Return 
     */
    Integer queryCount(BaseQuery query);

    
    /**
     *@Description 当前页数据
     *@Param
     *@Return 
     */
    List<T> queryData(BaseQuery query);
    
    /**
     *@Description 批量删除
     *@Param
     *@Return 
     */
    void patchDelete(List<Long> ids);

}
